package com.zxd.service;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.zxd.dao.IEmployeeDao;
import com.zxd.model.Employee;

@Service("employeeService")
public class EmployeeService implements IEmployeeService {
	private IEmployeeDao employeeDao;

	public EmployeeService() {
		System.out.println("employeeService");
	}

	public IEmployeeDao getEmployeeDao() {
		return employeeDao;
	}
	
	@Resource
	public void setEmployeeDao(IEmployeeDao employeeDao) {
		this.employeeDao = employeeDao;
	}

	@Override
	public Employee addEmployee(Employee employee) {
		employeeDao.add(employee);
		return employee;
	}

}
